﻿@{
    ViewBag.Title = "首页";
    var taskList = ViewBag.TaskList as List<CubicFWNet.Data.ViewModal.TaskRemindView>;
}

<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        首页
    </h1>
    <ol class="breadcrumb">
        <li><a href="javascript:void(0);"><i class="fa fa-dashboard"></i>@Resources.Global.PageTitle</a></li>
        <li><a href="@Url.Action("Index","Home")">首页</a></li>
    </ol>
</section>
<!-- Main content -->
<section class="content">
    <div class="callout callout-info">
        欢迎使用<span>@Resources.Global.PageTitle</span>
    </div>

    <section class="content-header">
        <h1>
            任务列表
        </h1>
    </section>
    <!-- Small boxes (Stat box) -->

    <section class="content">
        <div class="form-horizontal">
            <div class="box box-solid">
                <div class="box-body">
                    <table class="footable table table-stripped table-bordered table-hover" id="footable" data-page-size="20" data-filter=#filter>
                        <thead>
                            <tr>
                                <th data-sort-ignore="true">
                                    任务类型
                                </th>
                                <th data-hide="phone,tablet" data-sort-ignore="true">
                                    任务数量
                                </th>
                                <th data-sort-ignore="true">
                                    查看
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            @if (null != taskList)
                            {
                                foreach (var item in taskList)
                                {
                                    if (item.Number == 5)
                                    {
                                        if (ViewBag.PriCount != 0)
                                        {
                                        <tr>
                                            <td>
                                                <span>@item.Name</span>
                                            </td>
                                            <td>
                                                <span>@ViewBag.PriCount</span>
                                            </td>
                                            <td>
                                                <a href="@item.Url">查看</a>
                                            </td>
                                        </tr>
                                        }
                                    }
                                    else if (item.Number == 7)
                                    {
                                        if (ViewBag.SubCount != 0)
                                        {
                                            <tr>
                                                <td>
                                                    <span>@item.Name</span>
                                                </td>
                                                <td>
                                                    <span>@ViewBag.SubCount</span>
                                                </td>
                                                <td>
                                                    <a href="@item.Url">查看</a>
                                                </td>
                                            </tr>
                                        }
                                    }
                                    else
                                    {
                                        <tr>
                                            <td>
                                                <span>@item.Name</span>
                                            </td>
                                            <td>
                                                <span>@item.Count</span>
                                            </td>
                                            <td>
                                                <a href="@item.Url">查看</a>
                                            </td>
                                        </tr>
                                    }
                                }
                            }
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </section>

</section>
<!-- /.content -->